/* Parallel Elliptic Curve Cryptography Engine - An OpenSSL Engine which
 * uses the SPU Elliptic Curve Library to provide optimized functionality
 * on the CBEA.
 *
 * Copyright (C) 2008  Michael Annichiarico (mike.gcdeveloper@gmail.com)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "pecc-stage4_spuppu.h"

#define MYEA /* none */

#define mkpsfuncname(n) pecc_spu_##n
#define mkpsgfuncname(n) pecc_spu_##n##_get_args
#define mkpssfuncname(n) pecc_spu_##n##_set_result
#define mkpsfuncargtype(n) spu_##n##_t
#define mkpsfuncarg(n) mkpsfuncargtype(n) spu_##n##_arg
#define mkpsfunc(n) \
void mkpsfuncname(n) ( mkpsfuncargtype(n) *arg)
#define mkpsgfunc(n) \
void mkpsgfuncname(n) ( mkpsfuncargtype(n) *arg, spu_elem_t* el)
#define mkpssfunc(n) \
void mkpssfuncname(n) ( mkpsfuncargtype(n) *arg, spu_elem_t* el)
#define mkpsfuncprotos(n) \
mkpsfunc(n); \
mkpsgfunc(n); \
mkpssfunc(n); \

mkpsfuncprotos(add);
mkpsfuncprotos(mod_mult);
mkpsfuncprotos(ecdsa_sign);
//void pecc_spu_mod_mult(__ea spu_mod_mult_t* arg);

void pecc_spu_get_elem(void* dst, const spu_elem_t* el);
void pecc_spu_put_elem(const spu_elem_t* el, void* src);
void pecc_spu_get_list(void* dst, const spu_list_t* list);
void pecc_spu_put_list(const spu_list_t* list, void* src);
void pecc_dispatch_cmd(unsigned long long argp, spu_cmd_t* cmdp);

